﻿using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Metadata.Builders;
using System;
using System.Collections.Generic;
using System.Text;
using Xyz.Core.Data.Entity;

namespace Xyz.Core.Data.Configurations
{
    public class HbxxConfiguration : IEntityTypeConfiguration<Hbxx>
    {
        public void Configure(EntityTypeBuilder<Hbxx> builder)
        {
            builder.HasKey(e => e.MID);
            //builder.Property(e => e.Id).ValueGeneratedNever();
            builder.Property(x => x.Flightnum).HasMaxLength(50);
            builder.Property(x => x.DayTime).HasMaxLength(50);
            builder.Property(x => x.Type).HasMaxLength(50);
            builder.Property(x => x.Ac).HasMaxLength(50);
            builder.Property(x => x.Starting_point).HasMaxLength(50);
            builder.Property(x => x.End).HasMaxLength(50);
            builder.Property(x => x.ATime).HasMaxLength(50);
            builder.Property(x => x.EndAirport).HasMaxLength(50);
            builder.Property(x => x.Starting_pointAirport).HasMaxLength(50);
            builder.Property(x => x.HomeIcao).HasMaxLength(50);
            builder.Property(x => x.PointIcao).HasMaxLength(50);
            builder.Property(x => x.AaTime).HasMaxLength(50);
            builder.Property(x => x.BTime).HasMaxLength(50);
            builder.Property(x => x.BbTime).HasMaxLength(50);
            builder.Property(x => x.AaaTime).HasMaxLength(50);
            builder.Property(x => x.BbbTime).HasMaxLength(50);
            builder.Property(x => x.FTime).HasMaxLength(50);
            //指定对应的数据表名
            builder.ToTable("Hbxx");
        }
    }
}
